<template>
  <iframe
    id="iframe"
    :src="srcUrl"
    width="100%"
    height="600px"
    frameborder="0"
  ></iframe>
</template>
<script>
export default {
  data() {
    // 通用验证方法
    // var validate = formValidate
    return {
      srcUrl: ''
    }
  },
  created() {
    // const { params, query } = this.$route
    // const { path } = params
    // this.$router.replace({ path: '/' + path, query })
  },
  mounted() {
    console.log(this.$route.meta.iframUrl)
    this.srcUrl = this.$route.meta.iframUrl

    var iframe = document.getElementById('iframe')
    iframe.style.width = '100%'
    iframe.style.height = window.innerHeight - 88 + 'px'
    window.onresize = function() {
      iframe.style.height = window.innerHeight - 88 + 'px'
    }
  }
}
</script>
